import request from '@/utils/request';

// 列表
export const getList = () => {
  return request.get('/api/article/list');
};

// 新增
export const add = (data:any) => {
  return request.post('/api/article',data);
};
// 详情
export const getDetails = (id) => {
  return request.get(`/api/article/${id}`);
};
// 更新
export const update = (data:any) => {
  return request.put('/api/article',data);
};

// 删除
export const del = (id) => {
  return request.delete(`/api/article/${id}`)
};